export {}

/**
 * String[] names = {"张三","刘备",80}
 * 
 * List<String> list = new ArrayList<String>()
 * list.add("zhangsan")
 * list.add("刘备")
 * list.add(8)
 * 
 */

/**
 * 原生js
 */
// let names = ["张三","刘备",80]
// for (const index in names) {
//     console.log(index,names[index]);
    
// }


// let names:string[] = ["张三","刘备"]
// for (const index in names) {
//     console.log(index,names[index]);
// }

let names:Array<string> = ["张三","刘备"]
names.push("关羽")
for (const index in names) {
    console.log(index,names[index]);
}


// function sum(numa:number,numb:number){
//     console.log("两个数加和 "+(numa +numb))
// }

console.log("=============================================");

function sum(numa:number,numb:number){
    console.log(arguments);
    //arguments 类数组，可迭代 -->   迭代器
    const arg:IArguments  = arguments;
    for (let index = 0; index < arg.length; index++) {
        const element = arg[index];
        console.log(element);
        
    }

}

sum(10,30)


// let num:number = 100;